package com.biz.primus.ms.geo.trans;

import com.biz.primus.model.geo.vo.DistrictResponseVo;
import com.biz.primus.ms.geo.dao.ro.DistrictRo;
import com.google.common.base.Function;

/**
 * @author JKLiues
 * @date 2017/11/8
 */
public class DistrictRo2DistrictResponseVo implements Function<DistrictRo, DistrictResponseVo> {
    @Override
    public DistrictResponseVo apply(DistrictRo input) {
        if (input == null) {
            return null;
        }
        DistrictResponseVo resp = (DistrictResponseVo) new AbstractAreaRo2AbstractResponseVo(new DistrictResponseVo()).apply(input);
        resp.setProvinceId(input.getProvinceId().longValue());
        resp.setCityId(input.getCityId().longValue());
        return resp;
    }
}
